<?php
class Default_KnowledgeController extends Zend_Controller_Action {
	public function init() {
		/* Initialize action controller here */
		$this->newModel = new Default_Model_DbTable_News ();
	}
	public function indexAction() {
		// action body
		$maxId = $this->newModel->getNewsMaxId ( 19 );
		
		$maxNews = $this->newModel->getNewsById ( $maxId ['m'] );
		$this->view->maxNews = $maxNews;
		
		$this->view->topView = $this->newModel->topKnow ( 19 );
		
		$intro = $this->newModel->getNewsByCategoryId1 ( 19, $maxId ['m'] );
		$this->view->intro = $intro;
	}
	public function marketingonlineAction() {
		$maxId = $this->newModel->getNewsMaxId ( 31 );
		
		$maxNews = $this->newModel->getNewsById ( $maxId ['m'] );
		$this->view->maxNews = $maxNews;
		
		$this->view->topView = $this->newModel->topKnow ( 31 );
		
		$intro = $this->newModel->getNewsByCategoryId1 ( 31, $maxId ['m'] );
		$this->view->intro = $intro;
	}
	public function thuonghieusoAction() {
		$maxId = $this->newModel->getNewsMaxId ( 32 );
		
		$maxNews = $this->newModel->getNewsById ( $maxId ['m'] );
		$this->view->maxNews = $maxNews;
		
		$this->view->topView = $this->newModel->topKnow ( 32 );
		
		$intro = $this->newModel->getNewsByCategoryId1 ( 32, $maxId ['m'] );
		$this->view->intro = $intro;
	}
	public function seogoogleAction() {
		$maxId = $this->newModel->getNewsMaxId ( 33 );
		
		$maxNews = $this->newModel->getNewsById ( $maxId ['m'] );
		$this->view->maxNews = $maxNews;
		
		$this->view->topView = $this->newModel->topKnow ( 33 );
		
		$intro = $this->newModel->getNewsByCategoryId1 ( 33, $maxId ['m'] );
		$this->view->intro = $intro;
	}
	public function mangxahoifacebookAction() {
		$maxId = $this->newModel->getNewsMaxId ( 34 );
		
		$maxNews = $this->newModel->getNewsById ( $maxId ['m'] );
		$this->view->maxNews = $maxNews;
		
		$this->view->topView = $this->newModel->topKnow ( 34 );
		
		$intro = $this->newModel->getNewsByCategoryId1 ( 34, $maxId ['m'] );
		$this->view->intro = $intro;
	}
	public function laptrinhdesignwebsiteAction() {
		$maxId = $this->newModel->getNewsMaxId ( 35 );
		
		$maxNews = $this->newModel->getNewsById ( $maxId ['m'] );
		$this->view->maxNews = $maxNews;
		
		$this->view->topView = $this->newModel->topKnow ( 35 );
		
		$intro = $this->newModel->getNewsByCategoryId1 ( 35, $maxId ['m'] );
		$this->view->intro = $intro;
	}
}

